<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

	<div class="post page" id="post-<?php the_ID(); ?>">

		<h2 id="pagetitle"><?php the_title(); ?></h2>
		<div class="postcontent">
			<?php the_content(); ?>

			<?php wp_link_pages('before=<p id="pages">页面&after=</p>'); ?>

			<?php $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
			if ($children) {?>
				<h3 id="subpages">二级页面</h3>
				<ul>
					<?php echo $children; ?>
				</ul>
			<?php } ?>

		</div>		
	</div>


	<?php comments_template();?>


<?php
	endwhile;
	else :
		echo walleve_404_message();
	endif;
?>
	<?php if(!(is_page() || is_single()) ){ ?>
		<div id="pagenav">
			<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
		</div>
	<?php } ?>
</div>
<?php walleve_sidebar() ?>
<?php get_footer(); ?>